package com.codeckz.library_face.controller

import android.graphics.Rect
import android.view.TextureView
import androidx.camera.core.CameraSelector
import androidx.camera.view.PreviewView

/**
 *@packageName com.codeckz.library_face.controller
 *@author kzcai
 *@date 2022/1/7
 */
abstract  class ICameraController {


    var filterFace: BaseFilterFace? = null

    companion object{
        val FRONT_CAMERA = 1
        val BACK_CAMERA = 0
    }

    var onImageAnalysisListener: ((image: ByteArray?, result: FilterFaceResult) -> Unit)? = null

    var circleRect: Rect? = null

    var cameraFacing = BACK_CAMERA

    abstract fun setPreviewView(view:PreviewView)

    abstract fun setPreviewView(view:TextureView)

    abstract fun startCamera()

    abstract fun switchCamera()

    abstract fun switchCamera(cameraFacing: Int)

    abstract fun release()

}